<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>Site Manager</title>
        <link rel="stylesheet" type="text/css" href="<?= base_url(); ?>css/admin/reset.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="<?= base_url(); ?>css/admin/text.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="<?= base_url(); ?>css/admin/grid.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="<?= base_url(); ?>css/admin/layout.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="<?= base_url(); ?>css/admin/nav.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="<?= base_url(); ?>css/admin/custom.css" media="screen" />
        <!--[if IE 6]><link rel="stylesheet" type="text/css" href="../css/ie6.css" media="screen" /><![endif]-->
        <!--[if IE 7]><link rel="stylesheet" type="text/css" href="../css/ie.css" media="screen" /><![endif]-->


    </head>
    <body >
        <div class="container_16" >

            <?php include 'admin_header.php'; ?>

            <!-- Left Menu Panel !-->

            <?php include 'admin_left_menu.php'; ?>


            <!-- Content Panel -->	
            <div class="grid_7">
                <div class="box">
                    <h2>
                        <a href="#" id="toggle-tables">WEBSITE CONFIGURATION </a>
                    </h2>
                    <div class="block" >
                        <form name="cat" method="POST" action="<?= base_url(); ?>admin/settings/get_setting">
                            <fieldset>
                                <legend>Select Setting</legend>
                                <?php if($this->session->flashdata('message'))
                                          {
                                              $msg=$this->session->flashdata('message');
                                               echo '<font color="red">'.$msg.'</font>';
                                         }
                                        ?> 
                                <div class="field">
                                    <label> Setting Name</label>
                                   <select name="setting_variable" >
					 <option value="">Select Setting --></option>
					 <?php foreach ($settings as $settings): ?>
                                          <option value="<?= $settings->variable; ?>"><?= $settings->description; ?></option>
                                          <?php endforeach; ?>
                                       </select>
                                       
                                    <input type="submit" value="Get Setting" name="get_value" />
                                </div>
                                
                            </fieldset>
                        </form>
                    </div>
                </div> <!-- END OF BOX -->
             <?php if(isset($setting_id)){ ?>
                <div class="box">
                    <h2>
                        <a href="#" id="toggle-tables"><?= $setting_description; ?></a>
                    </h2>
                   
                    <div class="block" >
                        <fieldset>
                           <legend>Setting Data :</legend>
                           <form name="keyword" method="POST" action="<?= base_url(); ?>admin/settings/update">
                           <textarea name="variable_value" cols="102%" rows="5" id="variable_value"><?= $setting_value; ?></textarea></td>
                           <input name="setting_id" type="hidden" size="0" value="<?= $setting_id; ?>" />
                           <input name="setting_variable" type="hidden" size="0" value="<?= $setting_variable; ?>" />
                           <input type="submit" name="setting_update" value="Update <?= ucfirst($setting_description); ?>" style="float:right;margin-right:30px; "/>
                           </form>
                        </fieldset>
                    </div>
                </div> <!-- END OF BOX -->

                <?php } ?>
            </div>
            <div class="grid_16" id="site_info">
                <div class="box">
                    <p><?= $this->settings_model->get_setting('webtitle'); ?></p>
                </div>
            </div>
            <div class="clear"></div>
        </div>
        <script type="text/javascript" src="<?= base_url(); ?>js/admin/mootools-1.2.1-core.js"></script>
        <script type="text/javascript" src="<?= base_url(); ?>js/admin/mootools-1.2-more.js"></script>
        <script type="text/javascript" src="<?= base_url(); ?>js/admin/mootools-fluid16-autoselect.js"></script>
    </body>
</html>